<template>
  <div>
    <h1>home</h1>
    <ul class="list">
      <li>
        <router-link to="/homepage/shengxian">生鲜</router-link>
      </li>
      <li>
        <router-link to="/homepage/tiaoliao">调料</router-link>
      </li>
    </ul>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "HomePage",
  mounted() {
    console.log("主页的");
  },
  // 被keep-alive缓存组件激活时调用
  activated() {
    console.log("激活");
  },
  // keep-alive失活时调用
  deactivated() {
    console.log("失活");
  },
};
</script>

<style lang="scss" scoped>
.list {
  display: flex;
  justify-content: space-evenly;
}
</style>